<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ include file="/common/meta.jsp"%>

<script language="Javascript"  src="${ ctx}/scripts/htmlbox/htmlbox.colors.js" type="text/javascript"></script>
<script language="Javascript"  src="${ ctx}/scripts/htmlbox/htmlbox.styles.js" type="text/javascript"></script>
<script language="Javascript"  src="${ ctx}/scripts/htmlbox/htmlbox.syntax.js" type="text/javascript"></script>
<script language="Javascript"  src="${ ctx}/scripts/htmlbox/xhtml.js"  type="text/javascript"></script>
<script language="Javascript"  src="${ ctx}/scripts/htmlbox/htmlbox.min.js" type="text/javascript"></script>
<script language="Javascript"  src="${ ctx}/scripts/htmlbox/htmlbox.undoredomanager.js"  type="text/javascript"></script>
<script language="Javascript" src="${ ctx}/scripts/blog.js" type="text/javascript"></script>
<link href="${ ctx}/skins/showNotice.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript">
	var contextPath = "${ ctx}";
	var userId = "${ me.id}";
	$(function() {
		window.setTimeout("reSetTime()", 10);
		window.setInterval("reSetTime()", 1000 * 10); //时间的更新，每过10s更新一次
		readyBlog();
		var userId = "${me.id}";
	});
	readyBlog();
</script>
<style type="text/css">
.page-content {
	width: 1200px;
	margin: 0 auto;
	border-radius: 10px;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	position: relative;
	padding-top: 20px;
}

#column-main {
   width: 650px;
   float: left;
   border-left: dotted 0px;
   padding-left: 10px;
   border-left: dotted 0px;
   
   padding-right: 20px;
   -moz-box-shadow: 0 10px 20px #b0b3b6;    /*我们在这里设置阴影，同时设置padding-right使得其偏向于右边，（注：需要设置boreder当然需要设置其宽度为0使其看不见）*/
   -webkit-box-shadow: 0 10px 20px #b0b3b6;
   box-shadow: 0 10px 20px #b0b3b6;
   vertical-align: middle;
}

#column-left {
	margin-right: 14px;
	padding-top: 0px;
	padding-left: 0px;
	padding-bottom: 50px;
	width: 160px;
	float: left;
	margin-left: 50px;
}
#column-right {
	width: 250px;
	float: right;
}

input.button {
	background-color: rgba(47, 167, 226, 0.66);
	border: 1px solid rgb(51, 157, 189);
	color: rgb(250, 250, 252);
	cursor: pointer;
	font-size: 1em;
	height: 23px;
	padding: 2px 5px;
	vertical-align: middle;
	margin-top: 4px;
	margin-right: 10px;
}

.icon_edit {
	background-image:
		url(images/blog_app_bj.png?max_age=19830211&d=20130226105935);
	background-position: -303px 0;
	float: left;
	margin-right: 5px;
	display: inline-block;
	height: 16px;
	width: 16px;
	background-repeat: no-repeat;
	font-size: 0;
	margin: 3px;
	padding: 0;
}

input.submit {
	background-color: #108AC6;
	border: 1px solid #D2F3FD;
	color: white;
	cursor: pointer;
	font-size: 1em;
	height: 23px;
	padding: 2px 5px;
	vertical-align: middle;
	margin-right: 10px;
}


.blog_main_title {
	border-bottom: 1px dotted;
	margin-bottom: 10px;
	padding: 10px 11px 5px;
}

#fd {
	clear: both;
}

.right {
	float: right;
}

.results {
	border-left: 1px solid #BBBBBB;
	border-right: 1px solid #BBBBBB;
}

.results th,.results_lite th {
	background: none repeat scroll 0 0 #EEEEEE;
	border-bottom: 1px solid #CCCCCC;
	border-top: 1px solid #CCCCCC;
	padding-right: 2px;
	text-align: left;
	border: 1px solid #CCCCCC;
}

.border td {
	border: 1px solid #CCCCCC;
}

.blog_main_title {
	border-bottom: 1px dotted;
	margin-bottom: 0;
	padding: 2px 11px 2px;
	background-color: rgb(19, 43, 80);
	color:white;
}

.group_row td {
	background: none repeat scroll 0 0 #EBEFF9;
	cursor: pointer;
}

.results td {
	padding: 2px;
	border-bottom: 1px solid #CCCCCC;
}

table td,table th {
	font-size: 12px;
	padding: 6px 10px 6px 0;
	vertical-align: top;
	line-height: 1.5;
}

th,td {
	text-align: left;
	font-weight: normal;
}

.results {
	border-left: 1px solid #BBBBBB;
	border-right: 1px solid #BBBBBB;
}

tr {
	display: table-row;
	border: 1px solid #CCCCCC;
}
</style>
<nativeSql:sqlQueryForUnique
				sql="select * from t_blog where f_id = ${blog.id }"
				id="blog" />
<title>博客简介--- ${blog.f_blog_name }</title>
</head>
<body>
<body id="page-home">
	<%@ include file="/common/header.jsp"%>
	<div class='page-content'>

		<div id='column-left'><%@ include file="/common/left_blog_index.jsp"%></div>
		<div id="column-main">
			<input type="hidden" name="blog.id" value="${blog.f_id }" />
			
			<div style="margin-bottom: 3px;">
			<strong>博客名称</strong><span style="color: red; margin-left: 5px; font-weight: bold">*</span>
			<span class="required"   maxlength="80" name="blog.blogName" size="45"
			 style="width: 350px; height: 20px;" type="text">${blog.f_blog_name}</span> 
			</div>
			
			<div  style="margin-bottom: 3px;">
			  <strong>博客类型</strong><span style="color: red; margin-left: 5px; font-weight: bold">*</span> 
			  <c:if test="${blog.f_type=='public' }">公共博客</c:if> <c:if test="${blog.f_type=='private' }">私人博客</c:if>
			 </div> 
			 
			<div  style="margin-bottom: 10px;">
			  <strong>博客属性</strong><span style="color: red; margin-left: 5px; font-weight: bold">*</span> 
			  <c:if test="${blog.f_if_personal==0 }">不公开</c:if> <c:if test="${blog.f_if_personal==1 }">公开</c:if>
			 </div>
		<!-- 文本编辑框 -->
			<p >${blog.f_description }</p>
			<br/>
			
			<c:if test="${blog.f_manager_id==me.id && articlePagination.items!=null}">
				<div id="main">
				<div class='blog_main_title'>
					<strong>文章列表</strong>
					<div id='fd'></div>
				</div>
				<div id="content-body">
					<c:set var="pagination" value="${articlePagination}" />
					<table cellspacing="0" cellpadding="2" border="0" class="results"
						id="resultstable" width="100%">
						<thead>
							<tr class="group_row">
								<td colspan="100" style="border-top: 1px solid #CCCCCC;"><c:set
										var="searchMethod" value="blogDescription" /> <%@ include
										file="/common/pagination_new.jsp"%></td>
							</tr>
							<tr id="headingrow">
								<th style="border-left: 0" nowrap="nowrap">序号</th>
								<th class="col_1" nowrap="nowrap" id="summaryheading"
									width="130px"><a href="#" style="text-decoration: none">博文标题</a></th>
								<th class="col_0" nowrap="nowrap"><a href="#"
									style="text-decoration: none">所属博客</a></th>
								<th class="col_2" nowrap="nowrap"><a href="#"
									style="text-decoration: none">发表时间</a></th>
								<th class="col_3" nowrap="nowrap"><a href="#"
									style="text-decoration: none">分类标签 </a></th>
								<th class="col_3" nowrap="nowrap"><a href="#"
									style="text-decoration: none">浏览数</a></th>
								<th class="col_3" nowrap="nowrap"><a href="#"
									style="text-decoration: none">回复数</a></th>
								<th nowrap="nowrap" style="width: 50px;"><a
									href="#columnprefs" style="text-decoration: none">管理</a></th>
							</tr>
						</thead>
						<tbody class="border">

							<c:forEach var="myarticle" items="${articlePagination.items}"
								varStatus="status">
								<tr class="ifOpened" id="newModule${myarticle.id}">
									<td class="vt" nowrap="nowrap">
										${articlePagination.startIndex+status.index+1 }</td>
									<hql:queryForUnique
										hql="from Blog where id=${myarticle.blogId}" id="blog" />

									<td class="vt id col_1" width="130px"><a
										href="${ctx }/msg/blog.action?method:article&articleId=${myarticle.id }">
											<yn:cleanHtml str="${myarticle.title}" id="articleTextNoHtml" />
											<yn:shortIt len="15" str="${articleTextNoHtml}"
												id="articleTextTitle" /> ${articleTextTitle}
									</a></td>
									<td class="vt id col_0" nowrap="nowrap"
										title="${blog.blogName}"><a
										href="${ctx }/blog/blog.action?method:blog&blogId=${blog.id }">
											${blog.blogName} </a></td>
									<td class="vt id col_2" nowrap="nowrap"><a
										class="yj-message-blog-time"
										title="<fmt:formatDate value="${myarticle.creationDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
										href="javascript://"> <fmt:formatDate
												value="${myarticle.creationDate}"
												pattern="yyyy-MM-dd HH:mm:ss" /></a></td>
									<td class="vt col_3">${myarticle.tags }</td>
									<td class="vt col_4"><c:if
											test="${myarticle.click ==null}">0</c:if>${myarticle.click }</td>
									<nativeSql:sqlQueryForUnique
										sql="select count(*) as RECNT from t_article_comment where f_article_id=${myarticle.id} and f_parent_comment_id is null"
										id="replyCount" />
									<td class="vt col_5">${replyCount['RECNT']}</td>
									<td class="vt col_3" align="right"><a
										href="${ctx }/blog/blog.action?method:articleEditForm&articleId=${myarticle.id}"
										title="编辑"> <span class="icon_edit"></span></a> <a
										href="javascript://" class="gdeleteModule${myarticle.id}">
											<img alt="删除" src="${ctx }/img/delete2.png"
											style="margin-left: 8px" alt="删除" />
									</a></td>
								</tr>

							</c:forEach>
						</tbody>
					</table>

				</div>
				<div id='fd'></div>

				<br />

			</div>
			</c:if>
			
			
			
			
			
		</div>
	
		<div id='column-right'><%@ include file="/common/right_blog.jsp"%></div>
	</div>

	<div style="clear: both;"></div>
	<%@ include file="/common/footer.jsp"%>

<!-- 提醒框 -->
	<div id="dialog-confirm" title="提醒框" style="display: none;">
		<p style="line-height: 16px; margin: 0 0 1.5em;">
			<span class="ui-icon ui-icon-alert"
				style="float: left; margin: 0 7px 20px 0;"></span> &nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确定删除？YES|NO
		</p>
	</div>

	<div id="yj-inline-icon x-grey-icon yj-closeFlash"
		style="left: 351.5px; display: none;"
		class="yj-alert yj-notice zindex-t4">
		<span class="alert-icon flash-notice-icon"></span>
		<p>
			<a href="javascript://"
				class="yj-inline-icon x-grey-icon yj-closeFlash">x</a>The message
			has been bookmarked.
		</p>
	</div>
</body>
</html>